import { mapState } from 'vuex';

export default (await import('vue')).defineComponent({
name: "VuexDemo",
components: {},
data() {
return {
initNumber: 10
};
},
created() {
},
computed: {
...mapState(['count1']),
// ...mapState('userStore',['userName']),
// // ...mapGetters(['countResult']),
// ...mapGetters({
//   countResult: 'countResult',
//   doneCount: 'userStore/getterUserName'
// }),
// customComputed() {
//   return this.initNumber + this.count1
// }
},
methods: {
// ...mapMutations(['increment']),
// // ...mapMutations('useStore',['setUserName']),
// ...mapMutations({
//   cusSetUserName: 'userStore/setUserName'
// }),
// ...mapActions(['incrementAsync']),
changeUserName() {
this.cusSetUserName('张学友');
},
changeCount() {
this.$store.state.count1 += 10;
},
changeCountAsync() {
console.log(111);
this.incrementAsync(11);
}
}
});
